﻿<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
 	<!-- 包含公共的JSP代码片段 -->
	
<title>无线点餐平台</title>



<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="${ctx}/js/jquery.js"></script>
<script type="text/javascript" src="${ctx}/js/page_common.js"></script>
<link href="${ctx}/css/common_style_blue.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="${ctx}/css/index_1.css" />
</head>
<body>
<!-- 页面标题 -->
<div id="TitleArea">
	<div id="TitleArea_Head"></div>
	<div id="TitleArea_Title">
		<div id="TitleArea_Title_Content">
			<img border="0" width="13" height="13" src="${ctx}/images/title_arrow.gif"/> 餐桌列表
		</div>
    </div>
	<div id="TitleArea_End"></div>
</div>



<!-- 主内容区域（数据列表或表单显示） -->
<div id="MainArea">
    <table class="MainArea_Content" cellspacing="0" cellpadding="0">
        <!-- 表头-->
        <thead>
            <tr align="center" valign="middle" id="TableTitle">
				<td>编号</td>
				<td>桌名</td>
				<td>状态</td>
				<td>预定时间</td>
				<td>操作</td>
			</tr>
		</thead>	
		<!--显示数据列表 -->
        <tbody id="TableData" style="text-align: center">
		<c:forEach items="${dinnerTableList}" var="dinnerTable">
			<tr>
				<td>${dinnerTable.tableId}</td>
				<td>${dinnerTable.tableName}</td>
				<td>
					<c:choose>
						<c:when test="${dinnerTable.tableStatus==0}">
							空闲
						</c:when>
						<c:when test="${dinnerTable.tableStatus==1}">
							预定
						</c:when>
						<c:otherwise>
							使用中
						</c:otherwise>
					</c:choose>
				</td>
				<td>${dinnerTable.orderDate}</td>
				<td>
					<a href="${ctx}/getAllDinnerTable">
					<c:choose>
						<c:when test="${dinnerTable.tableStatus==0}">
							预定
						</c:when>
						<c:otherwise>
							退桌
						</c:otherwise>
					</c:choose>
					</a>
					<a href="${ctx}/delDinnerTable/${dinnerTable.tableId}">删除</a>
				</td>
			</tr>
		</c:forEach>
        </tbody>
    </table>
	
   <!-- 其他功能超链接 -->
	<div id="TableTail" align="center">
		<div class="FunctionButton">
			<a href="${pageContext.request.contextPath }/goToAddDinnerTable">添加</a>
		</div>
    </div> 
</div>
</body>
</html>
